<template>
  <h2>我是弟弟</h2>
  <div>哥哥说{{ gegesay }}</div>
</template>

<script setup lang='ts'>
import { ref, reactive, getCurrentInstance } from 'vue'

// 获取组件实例，才能调用$Bus
const instace = getCurrentInstance()

let gegesay = ref<string>('')

instace?.proxy?.$Bus.on('gegeSay', (val) => {
    gegesay.value = val as string
})

</script>
<style scoped>
</style>